package com.woniuxy.order.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.woniuxy.order.valid.RentHouseVaild;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


/**
 * <p>
 * 
 * </p>
 *
 * @author maotao
 * @since 2021-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)

public class RenthouseOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "订单id不能为空",groups = RentHouseVaild.class)
    private Integer id;
    @NotNull
    private String orderno;

    private LocalDateTime time;
    @NotNull
    private Integer houseid;
    @Size(min = 2,max = 10,message = "用户名称在{min}到{max}之间")
    private String user;
    @DecimalMin("0")
    private BigDecimal price;
    @NotNull
    private String creator;
    @NotNull
    private Integer pay;

    private Integer status;
}
